package com.zhentao.model.wemedia.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;


@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "wm_material")
public class WmMaterial implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    public Integer id;
    /**
     * 自媒体用户ID
     */

    @TableField("user_id")
    public Integer userId;
    /**
     * 图片路径
     */
    @TableField("url")
    public String url;
    /**
     * 素材类型
     * 0 图片
     * 1 视频
     */
    @TableField("type")
    public Short type;
    /**
     * 是否收藏
     */
    @TableField("is_collection")
    public Short isCollection;
    /**
     * 创建时间
     */
    @TableField("created_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    public Date createdTime;

}
